package com.wicket.okrcomponent.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.github.pagehelper.Page;
import com.github.pagehelper.page.PageMethod;
import com.wicket.okrcomponent.biz.service.CommunicationService;
import com.wicket.okrcomponent.biz.service.dto.req.*;
import com.wicket.okrcomponent.biz.service.dto.res.*;
import com.wicket.okrcomponent.common.ro.OkrResult;
import com.wicket.okrcomponent.common.util.CommonFunctionHelper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@RestController
@RequestMapping("/comp/communication/")
public class CommunicationController {

  @Autowired
  CommunicationService communicationService;
/**
   * D2修改变更消息内容(公共)
   */
    @PostMapping("updateChangeMessageContentCom")
    public OkrResult<UpdateChangeMessageContentComRespDto> updateChangeMessageContentCom(@RequestBody @Validated UpdateChangeMessageContentComReqDto reqDTO){
    return OkrResult.success(communicationService.updateChangeMessageContentCom(reqDTO));
    }
/**
   * D2执行删除消息及相关(公共)
   */
    @PostMapping("implementRemovalMessageCorrelationCom")
    public OkrResult<ImplementRemovalMessageCorrelationComRespDto> implementRemovalMessageCorrelationCom(@RequestBody @Validated ImplementRemovalMessageCorrelationComReqDto reqDTO){
    return OkrResult.success(communicationService.implementRemovalMessageCorrelationCom(reqDTO));
    }
/**
   * D2执行分享想法后回删(公共)
   */
    @PostMapping("implementShareIdeasDeleteBackCom")
    public OkrResult<ImplementShareIdeasDeleteBackComRespDto> implementShareIdeasDeleteBackCom(@RequestBody @Validated ImplementShareIdeasDeleteBackComReqDto reqDTO){
    return OkrResult.success(communicationService.implementShareIdeasDeleteBackCom(reqDTO));
    }
}
